#!/bin/sh

case "$1" in
  start)
    nice babysit 60 vmstat 15 2>&1 | logos vmstat &
    if is-storage-box; then
      nice babysit 60 diskperf 15 2>&1 | logos diskperf &
    fi
    ;;
  stop)
    pkillwait -x vmstat
    pkillwait -x diskperf
    ;;
  restart|reload)
    ;;
  *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
esac
